home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / sgelsx.z / sgelsx
Encoding:
Text File  |  2002-10-03  |  6.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. SSSSGGGGEEEELLLLSSSSXXXX((((3333SSSS))))                                                          SSSSGGGGEEEELLLLSSSSXXXX((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SGELSX - routine is deprecated and has been replaced by routine SGELSY
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      SUBROUTINE SGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK,
  13.                         INFO )
  14.  
  15.          INTEGER        INFO, LDA, LDB, M, N, NRHS, RANK
  16.  
  17.          REAL           RCOND
  18.  
  19.          INTEGER        JPVT( * )
  20.  
  21.          REAL           A( LDA, * ), B( LDB, * ), WORK( * )
  22.  
  23. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  24.      These routines are part of the SCSL Scientific Library and can be loaded
  25.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  26.      directs the linker to use the multi-processor version of the library.
  27.  
  28.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  29.      4 bytes (32 bits). Another version of SCSL is available in which integers
  30.      are 8 bytes (64 bits).  This version allows the user access to larger
  31.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  32.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  33.      only one of the two versions; 4-byte integer and 8-byte integer library
  34.      calls cannot be mixed.
  35.  
  36. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  37.      This routine is deprecated and has been replaced by routine SGELSY.
  38.      SGELSX computes the minimum-norm solution to a real linear least squares
  39.      problem:
  40.          minimize || A * X - B ||
  41.      using a complete orthogonal factorization of A.  A is an M-by-N matrix
  42.      which may be rank-deficient.
  43.  
  44.      Several right hand side vectors b and solution vectors x can be handled
  45.      in a single call; they are stored as the columns of the M-by-NRHS right
  46.      hand side matrix B and the N-by-NRHS solution matrix X.
  47.  
  48.      The routine first computes a QR factorization with column pivoting:
  49.          A * P = Q * [ R11 R12 ]
  50.                      [  0  R22 ]
  51.      with R11 defined as the largest leading submatrix whose estimated
  52.      condition number is less than 1/RCOND.  The order of R11, RANK, is the
  53.      effective rank of A.
  54.  
  55.      Then, R22 is considered to be negligible, and R12 is annihilated by
  56.      orthogonal transformations from the right, arriving at the complete
  57.      orthogonal factorization:
  58.         A * P = Q * [ T11 0 ] * Z
  59.                     [  0  0 ]
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSGGGGEEEELLLLSSSSXXXX((((3333SSSS))))                                                          SSSSGGGGEEEELLLLSSSSXXXX((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      The minimum-norm solution is then
  75.         X = P * Z' [ inv(T11)*Q1'*B ]
  76.                    [        0       ]
  77.      where Q1 consists of the first RANK columns of Q.
  78.  
  79.  
  80. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  81.      M       (input) INTEGER
  82.              The number of rows of the matrix A.  M >= 0.
  83.  
  84.      N       (input) INTEGER
  85.              The number of columns of the matrix A.  N >= 0.
  86.  
  87.      NRHS    (input) INTEGER
  88.              The number of right hand sides, i.e., the number of columns of
  89.              matrices B and X. NRHS >= 0.
  90.  
  91.      A       (input/output) REAL array, dimension (LDA,N)
  92.              On entry, the M-by-N matrix A.  On exit, A has been overwritten
  93.              by details of its complete orthogonal factorization.
  94.  
  95.      LDA     (input) INTEGER
  96.              The leading dimension of the array A.  LDA >= max(1,M).
  97.  
  98.      B       (input/output) REAL array, dimension (LDB,NRHS)
  99.              On entry, the M-by-NRHS right hand side matrix B.  On exit, the
  100.              N-by-NRHS solution matrix X.  If m >= n and RANK = n, the
  101.              residual sum-of-squares for the solution in the i-th column is
  102.              given by the sum of squares of elements N+1:M in that column.
  103.  
  104.      LDB     (input) INTEGER
  105.              The leading dimension of the array B. LDB >= max(1,M,N).
  106.  
  107.      JPVT    (input/output) INTEGER array, dimension (N)
  108.              On entry, if JPVT(i) .ne. 0, the i-th column of A is an initial
  109.              column, otherwise it is a free column.  Before the QR
  110.              factorization of A, all initial columns are permuted to the
  111.              leading positions; only the remaining free columns are moved as a
  112.              result of column pivoting during the factorization.  On exit, if
  113.              JPVT(i) = k, then the i-th column of A*P was the k-th column of
  114.              A.
  115.  
  116.      RCOND   (input) REAL
  117.              RCOND is used to determine the effective rank of A, which is
  118.              defined as the order of the largest leading triangular submatrix
  119.              R11 in the QR factorization with pivoting of A, whose estimated
  120.              condition number < 1/RCOND.
  121.  
  122.      RANK    (output) INTEGER
  123.              The effective rank of A, i.e., the order of the submatrix R11.
  124.              This is the same as the order of the submatrix T11 in the
  125.              complete orthogonal factorization of A.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSGGGGEEEELLLLSSSSXXXX((((3333SSSS))))                                                          SSSSGGGGEEEELLLLSSSSXXXX((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      WORK    (workspace) REAL array, dimension
  141.              (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
  142.  
  143.      INFO    (output) INTEGER
  144.              = 0:  successful exit
  145.              < 0:  if INFO = -i, the i-th argument had an illegal value
  146.  
  147. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  148.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  149.  
  150.      This man page is available only online.
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.